package Demo2;
public class text {
    public static void main(String[] args) {

    }

    public abstract static class Animal {
        private String name;
        private int age;

        public Animal(String name,int age){
            this.name = name;
            this.age = age;
        }

        public abstract void eat();

        public void setName(String name) {
            this.name = name;
        }

        public void setAge(int age) {
            this.age = age;
        }

        public String getName() {
            return name;
        }

        public int getAge() {
            return age;
        }
    }
}
